package com.education.welco.service.impl;


import com.education.common.utils.Convert;
import com.education.welco.mapper.LCatalogLabelMapper;
import com.education.welco.pojo.LCatalogLabel;
import com.education.welco.service.ILCatalogLabelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 备课标签关联 服务层实现
 *
 * @author d
 * @date 2020-05-08
 */
@Service
public class LCatalogLabelServiceImpl implements ILCatalogLabelService {

    @Autowired
    private LCatalogLabelMapper lCatalogLabelMapper;

    /**
     * 查询备课标签关联信息
     *
     * @param id 备课标签关联ID
     * @return 备课标签关联信息
     */
    @Override
    public LCatalogLabel selectLCatalogLabelById(Integer id) {
        return lCatalogLabelMapper.selectLCatalogLabelById(id);
    }

    /**
     * 查询备课标签关联列表
     *
     * @param lCatalogLabel 备课标签关联信息
     * @return 备课标签关联集合
     */
    @Override
    public List<Integer> selectLCatalogLabelListOnlyId(LCatalogLabel lCatalogLabel) {
        return lCatalogLabelMapper.selectLCatalogLabelListOnlyId(lCatalogLabel);
    }

    /**
     * 查询备课标签关联列表
     *
     * @param lCatalogLabel 备课标签关联信息
     * @return 备课标签关联集合
     */
    @Override
    public List<LCatalogLabel> selectLCatalogLabelList(LCatalogLabel lCatalogLabel) {
        return lCatalogLabelMapper.selectLCatalogLabelList(lCatalogLabel);
    }

    /**
     * 新增备课标签关联
     *
     * @param lCatalogLabel 备课标签关联信息
     * @return 结果
     */
    @Override
    public int insertLCatalogLabel(LCatalogLabel lCatalogLabel) {
        return lCatalogLabelMapper.insertLCatalogLabel(lCatalogLabel);
    }

    /**
     * 删除备课标签关联
     *
     * @param catalogId 备课标签关联ID
     * @return 结果
     */
    @Override
    public int deleteLCatalogLabelByCatalogId(Integer catalogId) {
        return lCatalogLabelMapper.deleteLCatalogLabelByCatalogId(catalogId);
    }

    /**
     * 修改备课标签关联
     *
     * @param lCatalogLabel 备课标签关联信息
     * @return 结果
     */
    @Override
    public int updateLCatalogLabel(LCatalogLabel lCatalogLabel) {
        return lCatalogLabelMapper.updateLCatalogLabel(lCatalogLabel);
    }

    /**
     * 删除备课标签关联对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteLCatalogLabelByIds(String ids) {
        return lCatalogLabelMapper.deleteLCatalogLabelByIds(Convert.toStrArray(ids));
    }
}